package com.kuang.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @program: SpringMVC
 * @description:
 * @author: 陈恩涛
 * @create: 2020-11-27 10:25
 **/

@Data
@Component
@NoArgsConstructor
@AllArgsConstructor
public class Person {

    private String name;
    private Integer age;

    //用于属性或者方法，把属性的格式序列化时转换成指定的格式。
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date birth;
    private String description;
}
